package com.yunsc.order.sevice;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yunsc.order.entity.YunscOrderAddressEntity;
import com.yunsc.store.entity.YunscUserAddressEntity;

/**
 * 订单收货地址记录表
 *
 * @author adan
 * @email 2028038953@qq.com
 * @date 2024-04-22 11:35:50
 */
public interface YunscOrderAddressService extends IService<YunscOrderAddressEntity> {

    /**
     * 根据订单ID查询收货地址
     * @param orderId 订单ID
     * @return 收货地址
     */
    YunscOrderAddressEntity queryAddressByOrderId(Integer orderId);

    /**
     * 保存订单收货地址到数据库
     *
     * @param address 收货地址
     * @param userId  用户ID
     * @param orderId 订单ID
     * @param storeId
     */
    void saveOrderAddressDB(YunscUserAddressEntity address, Integer userId, Integer orderId, Integer storeId);
}

